class Solution(object):
    def arraySign(self, nums):
        base = 1
        for num in nums:
            if base * num > 0:
                base = 1
            else:
                if base * num < 0:
                    base = -1
                else:
                    base = 0
        return base